package service.impl;

import dao.OrderDao;
import dao.impl.OrderDaoImpl;
import entity.Order;
import service.OrderService;

import java.util.List;

public class OrderServiceImpl implements OrderService {
    private static OrderDao orderDao = new OrderDaoImpl(Order.class);
    @Override
    public Order getById(String id) {
        return orderDao.getById(id);
    }

    @Override
    public List<Order> list() {
        return orderDao.list();
    }

    @Override
    public void update(Order order) {
        orderDao.updateById(order);
    }

    @Override
    public void remove(Order order) {
        orderDao.deleteById(order);
    }
}
